package com.arnold.controller;

import com.arnold.entity.ResponseData;
import com.arnold.entity.goods.Goods;
import com.arnold.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by arnold.zhu on 2017/9/27.
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @Autowired
    private TestService testService;

    @RequestMapping(value = "/buyGoods", method = RequestMethod.GET)
    public ResponseData buyGoods(Goods goods) {
        return testService.buyGoods(goods);
    }

    @RequestMapping(value = "/findAll", method = RequestMethod.GET)
    public ResponseData findAll() {
        return testService.findAll();
    }

}
